import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';

@Component({
  selector: 'zepride-memo-item',
  templateUrl: './memo-item.component.html',
  styleUrls: ['./memo-item.component.less']
})
export class MemoItemComponent implements OnInit {

  @Input() memoItem: MemoItem = {} as MemoItem;
  @Output() delete: EventEmitter<MemoItem> = new EventEmitter<MemoItem>();

  constructor() { }

  ngOnInit(): void { }

  deleteItem() {
    this.delete.emit(this.memoItem);
  }
}

interface MemoItem {
  type: 'system' | 'person';
  title: string;
  content: string;
  id: string;
  date: string;
  timeStart: Date;
  timeEnd: Date;
}
